/*
 * Copyright (c) 2011-2021, baomidou (jobob@qq.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package cc.siyecao.mapper.conditions;

import java.io.Serializable;

/**
 * 查询条件封装
 *
 * @author hubin miemie HCL
 * @since 2017-05-26
 */
@SuppressWarnings("unchecked")
public interface Func<W, R> extends Serializable {
    /**
     * 平均值
     */
    W avg(R column);

    /**
     * 求和
     */
    W sum(R column);

    /**
     * 最大值
     */
    W max(R column);

    /**
     * 最小值
     */
    W min(R column);

    /**
     * 转为小写
     */
    W lower(R column);

    /**
     * 转为大写
     */
    W upper(R column);

    /**
     * 替换字符
     */
    W replace(R column, String source, String target);

    /**
     * 字符长度
     */
    W length(R column);

    /**
     * 四舍五入
     */
    W round(R column, Integer value);

    /**
     * 去除空格
     */
    W trim(R column);
}
